﻿using System;
using System.Collections.Generic;
using System.Text;
using Microsoft.Win32;

namespace Client
{
    // PC Infos from Registry
    public class PCInfos
    {
        static RegistryKey key = RegistryKey.OpenRemoteBaseKey(RegistryHive.LocalMachine, "");
        static RegistryKey subkey = key.OpenSubKey("HARDWARE\\DESCRIPTION\\System\\BIOS");
        static RegistryKey subkey2 = key.OpenSubKey("HARDWARE\\DESCRIPTION\\System\\CentralProcessor\\0");

        public PCInfos()
        {

        }

        public static string SystemProductName
        {
            get
            {
                return subkey.GetValue("SystemProductName").ToString();
            }
        }

        public static string BIOSVendor
        {
            get
            {
                return subkey.GetValue("BIOSVendor").ToString();
            }
        }

        public static string BIOSVersion
        {
            get
            {
                return subkey.GetValue("BIOSVersion").ToString();
            }
        }

        public static string ProcessorNameString
        {
            get
            {
                return subkey2.GetValue("ProcessorNameString").ToString();
            }
        }

        public static string Identifier
        {
            get
            {
                return subkey2.GetValue("Identifier").ToString();
            }
        }


    }
}
